home *** CD-ROM | disk | FTP | other *** search
/ AGA Toolkit '97 / The AGA Toolkit '97.iso / miscellaneous / science / maths / calc / help / makefile < prev    next >
Encoding:
Makefile  |  1996-09-07  |  2.7 KB  |  124 lines

  1. #
  2. # help - makefile for calc help files
  3. #
  4. # Copyright (c) 1994 David I. Bell and Landon Curt Noll
  5. # Permission is granted to use, distribute, or modify this source,
  6. # provided that this copyright notice remains intact.
  7. #
  8. # Arbitrary precision calculator.
  9. #
  10. # calculator by David I. Bell
  11. # makefile by Landon Curt Noll
  12.  
  13. SHELL= /bin/sh
  14.  
  15. # Normally, the upper level makefile will set these values.  We provide
  16. # a default here just in case you want to build from this directory.
  17. #
  18. TOPDIR= /usr/local/lib
  19. #TOPDIR= /usr/lib
  20. #TOPDIR= /usr/libdata
  21.  
  22. LIBDIR= ${TOPDIR}/calc
  23. HELPDIR= ${LIBDIR}/help
  24.  
  25. # standard tools
  26. SED= sed
  27.  
  28. # Standard help files
  29. #
  30. # The obj.file is special and is not listed here.
  31. #
  32. STD_HELP_FILES1= intro overview help assoc builtin command config \
  33.     define environment expression file history interrupt list mat
  34. STD_HELP_FILES2= operator statement types usage variable
  35. STD_HELP_FILES3= todo credit
  36. STD_HELP_FILES= ${STD_HELP_FILES1} ${STD_HELP_FILES2} ${STD_HELP_FILES3}
  37.  
  38. # Help files that are constructed from other sources
  39. #
  40. # The obj.file is special and is not listed here.
  41. #
  42. BUILT_HELP_FILES= bindings altbind changes libcalc stdlib bugs
  43.  
  44. all: ${STD_HELP_FILES} obj.file ${BUILT_HELP_FILES} full
  45.  
  46. bindings: ../lib/bindings
  47.     rm -f bindings
  48.     cp ../lib/bindings bindings
  49.     chmod 0444 bindings
  50.  
  51. altbind: ../lib/altbind
  52.     rm -f altbind
  53.     cp ../lib/altbind altbind
  54.     chmod 0444 altbind
  55.  
  56. stdlib: ../lib/README
  57.     rm -f stdlib
  58.     cp ../lib/README stdlib
  59.     chmod 0444 stdlib
  60.  
  61. changes: ../CHANGES
  62.     rm -f changes
  63.     cp ../CHANGES changes
  64.     chmod 0444 changes
  65.  
  66. libcalc: ../LIBRARY
  67.     rm -f libcalc
  68.     ${SED} -e 's:$${LIBDIR}:${LIBDIR}:g' < ../LIBRARY > libcalc
  69.     chmod 0444 libcalc
  70.  
  71. bugs: ../BUGS
  72.     rm -f bugs
  73.     cp ../BUGS bugs
  74.     chmod 0444 bugs
  75.  
  76. full: ${STD_HELP_FILES} ${BUILT_HELP_FILES} Makefile
  77.     rm -f full
  78.     -for i in ${STD_HELP_FILES1} obj.file ${STD_HELP_FILES2} \
  79.         ${BUILT_HELP_FILES} ${STD_HELP_FILES3}; do \
  80.         if [ Xintro != X"$$i" ]; then \
  81.         echo " "; \
  82.         fi; \
  83.         if [ Xobj.file = X"$$i" ]; then \
  84.         j=obj; \
  85.         else \
  86.         j=$$i; \
  87.         fi; \
  88.         echo "*************"; \
  89.         echo "* $$j"; \
  90.         echo "*************"; \
  91.         echo ""; \
  92.         cat $$i; \
  93.     done > full
  94.  
  95. clean:
  96.  
  97. clobber:
  98.     rm -f ${BUILT_HELP_FILES} full
  99.  
  100. install: all
  101.     -@if [ ! -d ${TOPDIR} ]; then \
  102.         echo mkdir ${TOPDIR}; \
  103.         mkdir ${TOPDIR}; \
  104.     fi
  105.     -@if [ ! -d ${LIBDIR} ]; then \
  106.         echo mkdir ${LIBDIR}; \
  107.         mkdir ${LIBDIR}; \
  108.     fi
  109.     -@if [ ! -d ${HELPDIR} ]; then \
  110.         echo mkdir ${HELPDIR}; \
  111.         mkdir ${HELPDIR}; \
  112.     fi
  113.     @for i in ${STD_HELP_FILES} ${BUILT_HELP_FILES} full; do \
  114.         echo rm -f ${HELPDIR}/$$i; \
  115.         rm -f ${HELPDIR}/$$i; \
  116.         echo cp $$i ${HELPDIR}; \
  117.         cp $$i ${HELPDIR}; \
  118.         echo chmod 0444 ${HELPDIR}/$$i; \
  119.         chmod 0444 ${HELPDIR}/$$i; \
  120.     done
  121.     rm -f ${HELPDIR}/obj
  122.     cp obj.file ${HELPDIR}/obj
  123.     chmod 0444 ${HELPDIR}/obj
  124.